<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let p1 = new Promise((resolve, reject) => {
            resolve('OK')
        })
        let p2 = Promise.resolve('Success')
        let p3 = Promise.resolve('Oh Yes')

        const result = Promise.all([p1, p2, p3])
        console.log(result)
        result.then(res => {
            console.log(res)
        }, err => {
            console.log(err)
        })

        let p4 = Promise.reject('Oh No')
        const result1 = Promise.all([p1, p2, p4])
        console.log(result1)
        result1.then(res => {
            console.log(res)
        }, err => {
            console.log(err)
        })
    </script>
</body>

</html>